<template>
	<view>
		<view class="c-box-nobg">
			<u-image :src="$http+detail.imgUrl" height="300rpx" width="100%"></u-image>
		</view>
		<view class="c-box-nobg">
			<c-label title="简介"></c-label>
		</view>
		<view class="c-box-nobg fs26">
			{{detail.introduce}}
		</view>
		<view class="c-box-nobg">
			<c-label title="政策文件列表"></c-label>
		</view>
		<view class="c-box" v-for="item in list" :key="item.id" @click="tonr(item.id)">
			<h5>{{item.title}}</h5>
			<view class="t-g2 mt8" style="text-align:right;">
				{{item.createTime}}
			</view>
		</view>
	</view>
</template>

<script setup>
	import {
		onLoad
	} from '@dcloudio/uni-app'
	import {
		ref
	} from "vue"
	import {
		getListAPI,
		getrcDetailAPI
	} from '../../../api/youthStation'
	const detail = ref({})
	const id =ref()
	const getDetail = async () => {
		const res = await getrcDetailAPI(id.value)
		detail.value =res.data
	}
	const list = ref()
	const getList = async()=>{
		const res =await getListAPI(id.value)
		console.log(res);
		list.value =res.data
	}
	const tonr = (id)=>{
		uni.navigateTo({
			url:"/subpages/youthStation/nr/nr?id="+id
		})
	}
	onLoad((options)=>{
		id.value =options.id
		getDetail()
		getList()
	})
</script>

<style>

</style>